//
//  TestQDCtrl.m
//  qddemo
//
//  Created by apple on 12-5-18.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "TestQDCtrl.h"

@implementation TestQDCtrl

- (void)loadView {
    [super loadView];
    self.view.backgroundColor = [UIColor colorWithHue:0.5500 saturation:0.175 brightness:0.900 alpha:1.0000];
    
    //self.view.backgroundColor = [UIColor colorWithHue:0.1174 saturation:0.7131 brightness:0.8618 alpha:1.0000];
    //    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
    //    self.tableView.bounces = YES;
    //    ((QuickDialogTableView *)self.tableView).styleProvider = self;
    
}

+ (QRootElement *)createTestValue {     
    
//    Names *nameSet = [[[AppModel sharedModel] listOfNames] objectAtIndex:0];
    
    QRootElement *root = [[QRootElement alloc] init];
    root.controllerName = @"testQDChangeValue";
    root.grouped = YES;
    root.title = @"Test Values";
    
    QSection *sectionName = [[QSection alloc] init];
    
    QEntryElement *name = [[QEntryElement alloc] init];
    name.title = @"Name";    
    name.key = @"name";
//    name.textValue = nameSet.name;   
    name.hiddenToolbar = YES;
    name.placeholder = @"Name";
    [sectionName addElement:name];   
    
    QEntryElement *lastName = [[QEntryElement alloc] init];
    lastName.title = @"Last Name";    
    lastName.key = @"lastName";
//    lastName.textValue = nameSet.lastName; 
    lastName.hiddenToolbar = YES;
    lastName.placeholder = @"Last Name";
    [sectionName addElement:lastName];       
    
    QEntryElement *webPage = [[QEntryElement alloc] init];
    webPage.title = @"Web Page";    
    webPage.key = @"webPage";
//    webPage.textValue = nameSet.webPage; 
    webPage.hiddenToolbar = YES;
    webPage.placeholder = @"Web Page";
    [sectionName addElement:webPage]; 
    
    
    [root addSection:sectionName];
    
    return root;
    
}

@end
